﻿using System;
using System.Data;
using System.Data.SqlClient;
namespace Model
{
	 	//DbCompInfo
		public class DbCompInfo
	{
   		#region DbCompInfo
		/// <summary>
		/// 
		/// </summary>
		public DbCompInfo()
		{
		}
		/// <summary>	 
		/// 
		/// </summary>
		public DbCompInfo(Int32 cid)
		{
			this._cid = cid;
		
		}
		/// <summary>	 
		/// 
		/// </summary>		
		public DbCompInfo(DataRow dr)
		{
	            int.TryParse(Convert.ToString(dr["cId"]),out _cid);
                this._ccode = Convert.ToString(dr["cCode"]);
                this._cname = Convert.ToString(dr["cName"]);
                this._cnotes = Convert.ToString(dr["cNotes"]);
                this._ckeywords = Convert.ToString(dr["cKeywords"]);
                this._cdescription = Convert.ToString(dr["cDescription"]);
                this._cstatus = Convert.ToInt16(dr["cStatus"]);
                if(dr["cAddTime"] != DBNull.Value)
			        this._caddtime = Convert.ToDateTime(dr["cAddTime"]);
                this._ctype = Convert.ToInt32(dr["cType"]);
                if(dr["cEndDate"] != DBNull.Value)
			        this._cenddate = Convert.ToDateTime(dr["cEndDate"]);
                if(dr["cStaDate"] != DBNull.Value)
			        this._cstadate = Convert.ToDateTime(dr["cStaDate"]);
        			
		}
		#endregion
		
      	#region CId
		/// <summary>
		/// CId
        /// </summary>		
                private int _cid;
        public int CId
                {
            get{ return _cid; }
            set{ _cid = value; }
        }
        #endregion
        #region CCode
		/// <summary>
		/// CCode
        /// </summary>		
                private string _ccode;
        public string CCode
                {
            get{ return _ccode; }
            set{ _ccode = value; }
        }
        #endregion
        #region CName
		/// <summary>
		/// CName
        /// </summary>		
                private string _cname;
        public string CName
                {
            get{ return _cname; }
            set{ _cname = value; }
        }
        #endregion
        #region CNotes
		/// <summary>
		/// CNotes
        /// </summary>		
                private string _cnotes;
        public string CNotes
                {
            get{ return _cnotes; }
            set{ _cnotes = value; }
        }
        #endregion
        #region CKeywords
		/// <summary>
		/// CKeywords
        /// </summary>		
                private string _ckeywords;
        public string CKeywords
                {
            get{ return _ckeywords; }
            set{ _ckeywords = value; }
        }
        #endregion
        #region CDescription
		/// <summary>
		/// CDescription
        /// </summary>		
                private string _cdescription;
        public string CDescription
                {
            get{ return _cdescription; }
            set{ _cdescription = value; }
        }
        #endregion
        #region CStatus
		/// <summary>
		/// CStatus
        /// </summary>		
                private Int16 _cstatus;
        public Int16 CStatus
                {
            get{ return _cstatus; }
            set{ _cstatus = value; }
        }
        #endregion
        #region CAddTime
		/// <summary>
		/// CAddTime
        /// </summary>		
                private DateTime _caddtime;
        public DateTime CAddTime
                {
            get{ return _caddtime; }
            set{ _caddtime = value; }
        }
        #endregion
        #region CType
		/// <summary>
		/// CType
        /// </summary>		
                private int _ctype;
        public int CType
                {
            get{ return _ctype; }
            set{ _ctype = value; }
        }
        #endregion
        #region CEndDate
		/// <summary>
		/// CEndDate
        /// </summary>		
                private DateTime _cenddate;
        public DateTime CEndDate
                {
            get{ return _cenddate; }
            set{ _cenddate = value; }
        }
        #endregion
        #region CStaDate
		/// <summary>
		/// CStaDate
        /// </summary>		
                private DateTime _cstadate;
        public DateTime CStaDate
                {
            get{ return _cstadate; }
            set{ _cstadate = value; }
        }
        #endregion
        	}
}